FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g16f67d6.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g16f67d6.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=16f67d6 OS_GIT_VERSION=4.10.0-202202160023.p0.g16f67d6.assembly.stream-16f67d6 SOURCE_DATE_EPOCH=1643203962 SOURCE_GIT_COMMIT=16f67d6cf67395065ee6084d2ef7fcb7c74bb151 SOURCE_GIT_TAG=16f67d6c SOURCE_GIT_URL=https://github.com/openshift/csi-driver-manila-operator 
COPY . /go/src/github.com/openshift/csi-driver-manila-operator
RUN cd /go/src/github.com/openshift/csi-driver-manila-operator && \
    go build -mod vendor -o csi-driver-manila-operator cmd/csi-driver-manila-operator/main.go

FROM openshift/ose-base:v4.10.0.20220216.010142
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g16f67d6.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g16f67d6.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=16f67d6 OS_GIT_VERSION=4.10.0-202202160023.p0.g16f67d6.assembly.stream-16f67d6 SOURCE_DATE_EPOCH=1643203962 SOURCE_GIT_COMMIT=16f67d6cf67395065ee6084d2ef7fcb7c74bb151 SOURCE_GIT_TAG=16f67d6c SOURCE_GIT_URL=https://github.com/openshift/csi-driver-manila-operator 

ENV OPERATOR=/usr/local/bin/csi-driver-manila-operator \
    USER_UID=1001 \
    USER_NAME=csi-driver-manila-operator

COPY --from=0 /go/src/github.com/openshift/csi-driver-manila-operator/csi-driver-manila-operator ${OPERATOR}

COPY build/bin /usr/local/bin
RUN  /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

USER ${USER_UID}

LABEL \
        name="openshift/ose-csi-driver-manila-operator" \
        com.redhat.component="csi-driver-manila-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202202160023.p0.g16f67d6.assembly.stream" \
        io.openshift.build.commit.id="16f67d6cf67395065ee6084d2ef7fcb7c74bb151" \
        io.openshift.build.source-location="https://github.com/openshift/csi-driver-manila-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/csi-driver-manila-operator/commit/16f67d6cf67395065ee6084d2ef7fcb7c74bb151" \
        version="v4.10.0"

